﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SpiceNet.Circuits;
using SpiceNet.Parameters;

namespace SpiceNet.Models
{
    /// <summary>
    /// A class for describing time-dependent waveforms
    /// </summary>
    public abstract class Waveform : Parameterized
    {
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="wavename"></param>
        public Waveform(string wavename)
            : base(wavename)
        {
        }

        /// <summary>
        /// Setup the waveform
        /// </summary>
        /// <param name="ckt"></param>
        public abstract void Setup(Instance instance, Circuit ckt);

        /// <summary>
        /// Calculate the waveform at a specific time
        /// </summary>
        /// <param name="time"></param>
        /// <returns></returns>
        public abstract double At(double time);

        /// <summary>
        /// Accept
        /// </summary>
        /// <param name="ckt"></param>
        public abstract void Accept(Circuit ckt);
    }
}
